Skip to main content

Prerequisites

Before getting started, ensure you have:
  • A Sequence project with an access key from Sequence Builder
  • Node.js environment
  • Required packages installed:

Setting Up the Provider

First, create a provider to connect to the blockchain: Get your Sequence RPC URL from the Sequence Builder.

Signer Options

Sequence supports multiple signer types for secure key management.

1. Raw Private Key Signer

This is the most basic signer type. It uses an ethers.Wallet instance to sign transactions.

2. Google Cloud KMS Signer

You can use Google Cloud KMS to securely manage your private keys.
1
First install the @0xsequence/google-kms-signer package:
2
You need to setup GCP KMS to get the required env variables. See a guide based on our Sidekick solution here
3
Then, create a Google Cloud KMS signer:

3. AWS KMS Signer

You can use AWS KMS to securely manage your private keys.
1
First install the @0xsequence/aws-kms-signer package:
2
You need to setup AWS KMS to get the required env variables. See a guide based on our Sidekick solution here
3
Then, create an AWS KMS signer:

Factory Pattern for Signer Selection

You can create a factory function to select the appropriate signer based on environment configuration:
If you want to learn more about the KMS Signer libraries, you can read our blog post here.

Sending Transactions

Once you have a signer, you can use it to send transactions.
With this setup, you can securely connect to multiple blockchain networks and perform transactions from your backend services using Sequence.